package com.xxx.feignclients;

import com.xxx.fallback.CourseFeignClientFallback;
import com.xxx.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@FeignClient(value = "service-course", fallbackFactory = CourseFeignClientFallback.class)
public interface CourseFeignClient {
    @RequestMapping(value = "/course/info/{courseIds}", method = RequestMethod.GET)
    public JSONResult info(@PathVariable("courseIds") @Valid @NotNull(message = "课程id不能为空") String courseIds);
}
